// its C# BTW :)
// checks if INPUT_CONTEXT has just been released
// assumes `using static CitizenFX.Core.API;`
if(IsControlJustReleased(1, 51))
{
// run code here
}
-- its Lua BTW :)
-- checks if INPUT_CONTEXT has just been released
if IsControlJustReleased(1--[[input group]], 51--[[control index]]) then
-- run code here
end